package cn.zhouyafeng.itchat4j.resultBeans;

import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.Properties;

public class TulingConfig {

    public static String robotKey1;
    public static String robotKey2;


    public static String importantPeople;

    public static String autoReplay;


    public static String robotStartWith;
    public static String personStartWith;


    public static String saveUrl;
    public static String fixedTime;
    public static String contentTime;


    static {
        InputStream inputStream = TulingConfig.class.getClassLoader().getResourceAsStream("TulingConfig.properties");

        Properties p = new Properties();
        try {
            p.load(new InputStreamReader(inputStream,"UTF-8"));
        } catch (IOException e) {
            e.printStackTrace();
        }
        robotKey1 = p.getProperty("robotKey1");
        robotKey2 = p.getProperty("robotKey2");
        importantPeople = p.getProperty("importantPeople");
        autoReplay = p.getProperty("autoReplay", "");
        robotStartWith = p.getProperty("robotStartWith", "");
        personStartWith = p.getProperty("personStartWith", "");
        saveUrl = p.getProperty("saveUrl");
        fixedTime = p.getProperty("fixedTime");
        contentTime = p.getProperty("contentTime");

        System.out.println("初始化配置信息:     " + robotKey1 + robotKey2 + importantPeople +
                autoReplay + robotStartWith + personStartWith + saveUrl + fixedTime + contentTime);

    }

}
